package com.ruowei.modules.foodOrder.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.foodOrder.domain.OrderLifeCycle;

import com.ruowei.modules.foodOrder.domain.QOrderLifeCycle;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * Spring Data  repository for the OrderLifeCycle entity.
 */
@SuppressWarnings("unused")
@Repository
public interface OrderLifeCycleRepository extends BaseRepository<Long, OrderLifeCycle, QOrderLifeCycle> {
    List<OrderLifeCycle> findByOrderCodeOrderByTimeAsc(String orderCode);

    List<OrderLifeCycle> findByOrderRerunCodeIsNotNullAndOrderCodeOrderByTimeAsc(String orderCode);

    Optional<OrderLifeCycle> findFirstByOrderCodeAndTitleOrderByTimeAsc(String orderCode, String title);
}
